async tempus dormiet
Translation status: Tiếng Việt reader-locale proof. Term names and code fences follow the vi pack; supporting prose may still be English.
Async tempus.sleep_async and sync tempus.sleep share the tempus:dormiet route.
Syntax: tempus.sleep(ms) | đợi_bỏ tempus.sleep_async(ms)
Category#
ad
Related#
Examples#
radix/corpus/ad/async-tempus-dormiet.fab (canonical · concept)#
Async tempus.sleep_async and sync tempus.sleep share the tempus:dormiet route.
# =============================================================================
# async tempus dormiet — async tempus.sleep_async and sync tempus.sleep share
# the tempus:dormiet route.
# =============================================================================
#
# What this teaches:
# • Timer proof pair — `expectet` (sync) and `dormiet` (async) use the same
# `tempus:dormiet` route; caller posture selects the materializer
# • Async entry — `bắt_đầu_bất_đồng_bộ { … }` is the async program entry point
#
# Common mistakes:
# • confusing gọi route syntax — `đợi_bỏ` awaits and discards async completion
#
# See also: gọi, tempus, tương_lai, kênh
# =============================================================================
# Timer proof pair for async `gọi` materialization.
#
# `expectet` is the synchronous wrapper and `dormiet` is the async wrapper.
# Norma currently declares the async wrapper with compatibility `@ tương_lai`; this
# example consumes it through `đợi_bỏ`.
import from "norma:time" tempus
async_main {
tempus.sleep(0)
await tempus.sleep_async(0)
assert true
}